<template>
	<view class="page">
		<view class="page-content">
			<view class="page-content-item" :class="{'tpf-user-income':item.money>0}" v-for="(item, itemIndex) in list" :key="itemIndex">
				<view class="pcitem-left">
					<view class="iconfont" :style="'font-family: tpf-iconfont;'">{{'\ue606'}}</view>
					<view class="pcitem-left-r">
						<view>{{item.desc}}</view>
						<view>{{item.change_time}}</view>
					</view>
				</view>
				<view class="">{{item.money}}</view>
			</view>
			<uni-load-more :status="loadMoreStatus"></uni-load-more>
		</view>
	</view>
</template>

<script>
	import data from '@/data/ucenter/commission-detail/commission-detail.js';

	export default {
		data() {
			return {
				list: [],
				loadMoreStatus : "more",
				pageData:{
					last_page:1,
					total:1
				},
				postData:{
					current_page:1,
					per_page:10,
					page:1,
					type:3,
				},
			}
		},
		async created() {
			const CommissionDetailList = data.getCommissionDetailList();
			this.list = await CommissionDetailList;
		}
	}
</script>

<style lang="scss" scoped>
	.page{
		position: absolute;
		top: 0;
		right: 0;
		bottom: 0;
		left: 0;
		background-color: $uni-bg-color-hover;
	}
	.page-bar{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		font-size: 30rpx;
		padding: 10rpx 0rpx;
	}
	.page-bar-left{
		display: flex;
		display: -webkit-flex;
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		width: 85vw;
		height: 40rpx;
		padding: 0rpx 60rpx;
	}
	.page-bar-right{
		width: 15vw;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: center;
		border-left: 1px solid #cecece;
	}
	.page-content{
		display: flex;
		flex-direction: column;
		font-size: $uni-font-size-base;
	}
	.page-content-item{
		display: flex;
		align-items: center;
		justify-content: space-between;
		height: 140rpx;
		padding: 0rpx 15rpx;
		background-color: $uni-bg-color;
		border-bottom: 1px solid $uni-bg-color-hover;
	}
	.pcitem-left{
		display: flex;
		align-items: center;
		justify-content: flex-start;
	}
	.pcitem-left-r{
		font-size: 28rpx;
		margin-left: $uni-spacing-row-sm;
	}
	.iconfont{
		font-size: 60rpx;
	}
	.tpf-user-income{
		color: #009688;
	}
</style>
